package book;
//书架
public class BookList {
    private final Book[] books=new Book[10];
    private int usedSize=3; //记录当前books数组当中有多少本书
    public BookList() {
        books[0]=new Book("哈哈","1",1,"1");
        books[1]=new Book("牛","2",2,"2");
        books[2]=new Book("王者","3",3,"3");
    }
    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }
    public Book getBook(int pos) {
        return books[pos];
    }
    public void setBook(Book book) {
        this.books[usedSize]=book;
    }
    public void setBook(int pos,Book book) {
        this.books[pos]=book;
    }
}
